Managing Models
Designer > Models is the central repository for models. It's the starting point for managing the content, settings, and testing for all your models. From here, you can:
- Find and view an existing model
- Create a new model from scratch or by importing an existing one
- Link the model to an Eggplant Functional suite
- Edit a model
- Update the access list for a model
- Delete a model
- Run tests against a model
- View test results for a model
- View the version history for a model
- Revert to a previous model version
- Export a model for reuse
- View Orphaned Models
See Building a Model to learn how to plan and build your first model.
Find and View a Model
All existing models are displayed on the Models page in alphabetical order.
- To filter the list, just enter full or partial model names in the search box.
- To check that you've found the right model, click View to preview the model.
Add a New Model
Create a new model from scratch or import and reuse an existing model. The user who creates a model is automatically assigned access to it.
Create a New Model
Follow these instructions to create a new model from scratch.
- From Models, click Create New.
- Enter a unique model name without spaces. Only the following special characters are supported: underscore (
_
), tilde (~
), and hyphen (-
). - Click Save. The Model workspace opens ready for you to start building your new model.
Import a Model
To save time, reuse elements from existing models instead of recreating them. This is particularly useful when sharing models with other team members, for debugging, and taking backups.
From Eggplant DAI 6.1 onwards, you can also use Save As in the Model workspace to use an existing model as a template for a new one.
- Export the json file from the model that you want to reuse.
- From Models, click Import.
- Click Choose file to browser to and open the exported json file on your local machine.
- Enter a new name for your model.
- Click Save. The Model workspace opens ready for you to start updating the imported model.
The new model is no longer associated with a Eggplant Functional suite so you will need to relink it.
Link a Model to a Suite
Before you can include your model in a test configuration and run a set of tests, you must associate it with an Eggplant Functional suite.
To avoid changes from being overwritten, always upload any scripts that you’ve updated in an execution environment before you run tests from the runner.
To link a suite to a model:
- Go to Models and find the model that you need to update.
- Click Link a suite to run this model.
- From the Suite Association list, select the suite you want to link the model to and click Save.
Use the same method to link a new suite to an existing model.
Edit a Model
When you want to return to an existing model to update it:
- Go to Models and find the model that you're interested in.
- Click Edit. The Model workspace opens ready for you to start updating the model.
Delete a Model
You can easily remove a model that you no longer need. Before you do, consider exporting the model json so that you can reuse any work you've already done.
- Go to Models and find the model that you're interested in.
- From the actions menu on the model, select Delete. The model is deleted along with any link to an Eggplant Functional suite. The suite is not removed.
Run Tests Against a Model
Running tests against a model as you build can make it easier to identify and resolve any issues.
- Go to Models and find the model that you're interested in.
- From the actions menu on the model, select Run. The Live Run page opens with your model selected ready to configure your test.
View Test Results
You can easily view detailed results for tests run against any of your existing models.
- Go to Models and find the model that you're interested in.
- From the actions menu on the model, select View Results. The test results page opens showing the details of each test run in date order.
View the Version History
When you save a model in the Model workspace, a new version is created along with a customisable tag name. To see details of the version history for a model:
- Go to Models and find the model that you're interested in.
- From the actions menu on the model, select Version History. A list of model versions is displayed.
Revert to a Previous Version
Model versions are preserved so that you can switch between them.
- Open the version history for the model you're interested in.
- Click Revert next to the version that you want to restore. The selected version is reloaded and you return to the Models page.
- To revert to a previous version of the model, select the version you want to open and click Revert.
Export a Model
You can export any of your existing models in json file format so that you can reuse them.
- Go to Models and find the model that you want to export.
- From the actions menu on the model, select Export. A json file then downloads with the same name as the current model ready for import.
View Orphan Models
A model may sometimes get left in a state with no active users or groups left in the system with access assigned to it. We call those models orphaned. Admin users can choose to display only those models in the Model Hub UI if they want to perform administrative tasks on them, like assigning them to someone else or deleting them from the system.
- Go to Designer > Models.
- Click the dropdown button and select Orphan models only. The UI updates to displays only orphaned models if any are present in the system.